#!/bin/bash

if [[ $(id -u) != 0 ]]; then
    echo "Please run as root or use sudo"
    exit 1
fi

set -x

apt-get install -y openssh-server
# do not use systemctl start ssh for no systemd in docker
/etc/init.d/ssh restart

systemctl enable ssh && systemctl status ssh || true

